/*
* ECARX Technology Limited is the owner of the copyright and the trade secret of this software.
* Without permission, no one has the right to obtain, disclose or use this software in any way.
*/

package ecarx.xsf.notificationcenter.base.push.model.payload;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class PushMsgModel implements Parcelable {

    private String id;
    private String category;
    private String beep;
    private String tts;
    private String sourcePackage;
    private String tag;
    private PushMsgStyle style;
    private PushMsgContent content;
    private String background;
    private String seesay;

    private PushSmartCard smartcard;

    private List<PushMsgEvent> event;
    private List<PushMsgEvent> seesayevent;

    public PushMsgModel() {

    }

    public PushMsgModel(String id, String category, String beep, String tts, String sourcePackage,
                        String tag, PushMsgStyle style, PushMsgContent content, String background,String seesay, PushSmartCard smartcard, List<PushMsgEvent> event, List<PushMsgEvent> seesayevent) {
        this.id = id;
        this.category = category;
        this.beep = beep;
        this.tts = tts;
        this.sourcePackage = sourcePackage;
        this.tag = tag;
        this.style = style;
        this.content = content;
        this.background = background;
        this.seesay = seesay;
        this.smartcard = smartcard;
        this.event = event;
        this.seesayevent = seesayevent;
    }

    protected PushMsgModel(Parcel in) {
        id = in.readString();
        category = in.readString();
        beep = in.readString();
        tts = in.readString();
        sourcePackage = in.readString();
        tag = in.readString();
        style = in.readParcelable(PushMsgStyle.class.getClassLoader());
        content = in.readParcelable(PushMsgContent.class.getClassLoader());
        background = in.readString();
        seesay = in.readString();
        smartcard = in.readParcelable(PushSmartCard.class.getClassLoader());
        event = in.createTypedArrayList(PushMsgEvent.CREATOR);
        seesayevent = in.createTypedArrayList(PushMsgEvent.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(category);
        dest.writeString(beep);
        dest.writeString(tts);
        dest.writeString(sourcePackage);
        dest.writeString(tag);
        dest.writeParcelable(style, flags);
        dest.writeParcelable(content, flags);
        dest.writeString(background);
        dest.writeString(seesay);
        dest.writeParcelable(smartcard, flags);
        dest.writeTypedList(event);
        dest.writeTypedList(seesayevent);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<PushMsgModel> CREATOR = new Creator<PushMsgModel>() {
        @Override
        public PushMsgModel createFromParcel(Parcel in) {
            return new PushMsgModel(in);
        }

        @Override
        public PushMsgModel[] newArray(int size) {
            return new PushMsgModel[size];
        }
    };


    public void setSeesay(String seesay) {
        this.seesay = seesay;
    }

    public String getSeesay() {
        return seesay;
    }

    public List<PushMsgEvent> getSeesayevent() {
        return seesayevent;
    }

    public void setSeesayevent(List<PushMsgEvent> seesayevent) {
        this.seesayevent = seesayevent;
    }

    public String getBeep() {
        return beep;
    }

    public void setBeep(String beep) {
        this.beep = beep;
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getSourcePackage() {
        return sourcePackage;
    }

    public void setSourcePackage(String sourcePackage) {
        this.sourcePackage = sourcePackage;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public PushMsgStyle getStyle() {
        return style;
    }

    public String getTts() {
        return tts;
    }

    public void setTts(String tts) {
        this.tts = tts;
    }

    public PushSmartCard getSmartcard() {
        return smartcard;
    }

    public void setSmartcard(PushSmartCard smartcard) {
        this.smartcard = smartcard;
    }

    public void setStyle(PushMsgStyle style) {
        this.style = style;
    }

    public PushMsgContent getContent() {
        return content;
    }

    public void setContent(PushMsgContent content) {
        this.content = content;
    }

    public List<PushMsgEvent> getEvent() {
        return event;
    }

    public void setEvent(List<PushMsgEvent> event) {
        this.event = event;
    }

    public String getBackground() {
        return background;
    }

    public void setBackground(String background) {
        this.background = background;
    }
}
